package com.ad.backstage.service;

import com.ad.backstage.model.UploadRecord;
import com.ad.payload.vo.UploadFileVo;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * @author:dxgong
 * @日期 2021/4/23 17:48
 * @注释
 */
public interface UploadService {


    /**
     * 根据business_id查询图片
     *
     * @param id
     */
    List<UploadRecord> queryUploadRecordByBusinessId(Long id);


    /**
     *  cos上传图片
     *
     *  @param file
     *  @param bucketName cos 桶名
     * */
    UploadFileVo uploadFile(MultipartFile file, String bucketName);


    /**
     *  cos上传图片
     *
     *  @param file
     *  @param bucketName cos 桶名
     * */
    UploadFileVo uploadFileForBusinessType(MultipartFile file, String bucketName, String businessType);


    /**
     * 修改上传记录
     *
     * @param uploadRecord 上传记录
     * */
    Long updateUploadRecord(UploadRecord uploadRecord);


    /**
     * 根据businessId更新删除状态
     *
     * @param businessId 业务id
     * */
    Long deleteUploadRecord(String businessId);


    /**
     * 新增图片表记录
     *
     * @param uploadRecord 记录
     * */
    Long saveUploadRecord(UploadRecord uploadRecord);


}
